﻿using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;

using XZTZ.UMP.Public.Models.Bid;
using XZTZ.UMP.Public.Models.Base;
using XZTZ.UMP.Public.Models.Change;

namespace XZTZ.UMP.WEB.Data
{
    public class ApplicationDbContext : IdentityDbContext
    {
        public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
            : base(options)
        {
        }

        public DbSet<BillVision> Base_BillVisions { get; set; }
        public DbSet<BillTemplet> Base_BillTemplets { get; set; }
        public DbSet<BillProperty> Base_BillPropertys { get; set; }
        public DbSet<CompanyType> CompanyType { get; set; }
        public DbSet<CompanyInfo> CompanyInfo { get; set; }
        public DbSet<DeparmentInfo> DeparmentInfo { get; set; }
        public DbSet<XZTZ.UMP.Public.Models.Base.AddressBook> AddressBook { get; set; }
        public DbSet<XZTZ.UMP.Public.Models.Base.AddressBookJoinUser> AddressBookJoinUser { get; set; }
        //public DbSet<XZTZ.UMP.Public.Models.Asp.UmpUsers> AspNetUsers { get; set; }

        public DbSet<ProjectInfo> ProjectInfo { get; set; }

        public DbSet<v_ChangeBaseInfo> v_ChangeBaseInfo { get; set; }
        //public DbSet<Change_BaseInfo> Change_BaseInfo { get; set; }
        //public DbSet<Change_GetProjectSumByChangeIDList> Change_GetProjectSumByChangeIDList { get; set; }
        //public DbSet<Change_Association> Change_Association { get; set; }
        //public DbSet<Change_GetProjectSumByChange> Change_GetProjectSumByChange { get; set; }
        //public DbSet<Change_GetProjectSumByChangeIDResult> Change_GetProjectSumByChangeIDResult { get; set; }

        //protected override void OnModelCreating(ModelBuilder modelBuilder)
        //{
        //    modelBuilder.Query<v_ChangeBaseInfo>().ToView("v_ChangeBaseInfo").Property(v => v.guidChangeID).HasColumnName("guidChangeID");
        //}
    }
}
